Helpful Information
 
 
Category: SQL Server
SQL Server -> AS/400

Guys, I have a question. I'm trying to connect to an AS/400 using the following script


IF OBJECT_ID('Select * from systables where name LIKE 'ServerName') <> 0

EXEC sp_droplinkedsrvlogin 'ServerName', NULL
EXEC sp_dropserver 'ServerName'
GO
EXEC sp_addlinkedserver
@server = 'ServerName',
@srvproduct = 'Client Access ODBC Driver (32-bit)',
@provider = 'IBMDA400',
@datasrc = 'LibraryName', --Absolute path excluding filename
@provstr = ''
GO

EXEC sp_addlinkedsrvlogin 'ServerName', false, NULL, 'UserName', 'Password'

GO

Exec sp_helpserver 'ServerName'


exec sp_helplogins


Obviously, Names have been changed to protect the innocent :D. I know this is wrong, but I can't figure it out. Can someone give me a boost here?

wow... no takers.










privacy (GDPR)